Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to menu Attributes, to be able to build Relative or Absolute paths for urls #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nnmer
Copy link

@nnmer nnmer commented Sep 11, 2014

This should be merged only after octobercms/october#611 will be merged, as current plugin depends from the system core methods

nnmer and others added 2 commits September 11, 2014 12:52
Both commit adding the ability to switch Relative or Absolute path for url builder
@nnmer
Copy link
Author

nnmer commented Sep 11, 2014

After apply the diff to working website - need to rebuild menu links, or change the field is_absolute at DB to 1, where links are absolute (by default all links are absolute)

@Flynsarmy
Copy link
Owner

Thanks. Leave a message in here if your October PR gets accepted and I'll take a look.

@nnmer
Copy link
Author

nnmer commented Sep 12, 2014

Additional updates, please check the commits

@nnmer
Copy link
Author

nnmer commented Sep 12, 2014

Slug params fix should be moved to another PR, cannot figure out how to make that now

@nnmer
Copy link
Author

nnmer commented Sep 18, 2014

Flynsarmy, the patch for octobercms core was merged, please take a look at this PR

@Flynsarmy
Copy link
Owner

This PR sets Page item types to relative but all the others stay absolute resulting in confusing behavior. I can't merge this.

@nnmer
Copy link
Author

nnmer commented Sep 19, 2014

Here is 4 commits.
In commit ea7a260 I fix the absolute/relative switcher should be shown only for a Page.

For link - there is no term "absolute" or "relative", as I think you mean in the beginning that link - is an external link, so ,should have http:// in the beginning.

For partials as well, do you think partials should be called by relative/absolute link? I think the way it is now is enough.

The only one problem was - link to a page, as we anyway have to select an internal page - there is no sense to make absolute path! The relative is enough. But some times it could be necessary to tell builder exactly about relative or absolute

@that0n3guy
Copy link

I kind of disagree with some of this.

Pages/blogs (onsite stuff) should always be stored as relative (ie /blog/5 rather than https://octobercms.com/blog/5) because they are always going to be on the site and there is no need to store the domain (as it can change).

Links on the other hand should have a switcher (or no switcher at all and just let the user put whatever they want in the text box). As you could link to an offsite url (thus needing to be absolute) or simply linking to a custom onsite url (like if you specify a custom route). The custom onsite url wouldn't need to be absolute, and you probably wouldn't want it to be.

Also, fyi, the referenced october PR was commited.

@nnmer
Copy link
Author

nnmer commented Sep 26, 2014

thatOn3guy, agree :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants